package com.boot.system.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 系统字典
 *
 * @author yangfan
 * @date 2023-12-25 20:55:34
 */
@Data
@Schema(description = "系统字典")
public class SysDictDTO implements Serializable {


    /**
     * 字典ID
     */
    @Schema(description = "字典ID")
    private String id;

    /**
     * 上级字典ID
     */
    @Schema(description = "上级字典ID")
    private String parentId;

    /**
     * 字典编码
     */
    @Schema(description = "字典编码")
    private String code;

    /**
     * 字典key
     */
    @Schema(description = "字典key")
    private String dictKey;

    /**
     * 字典value
     */
    @Schema(description = "字典value")
    private String dictValue;

    /**
     * 排序
     */
    @Schema(description = "排序")
    private Integer sortOrder;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    private List<SysDictDTO>children;

    public List<SysDictDTO> getChildren() {
        if (children==null){
            children=new ArrayList<>();
        }
        return children;
    }
}